home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / ticker2.zip / scripts / commerce.cmd next >
OS/2 REXX Batch file  |  1996-06-14  |  865b  |  37 lines

  1. /*********************************/
  2. /* script to display commercials */
  3. /*********************************/
  4.  
  5. /* this script will read the file scripts\commerce.txt 
  6.    each line in this file has the format:
  7.    <filename of a commercial-file> <expire>  */ 
  8.  
  9. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  10. call SysLoadFuncs
  11.  
  12. filename = 'scripts\commerce.txt'
  13.  
  14. actline = 0
  15.  
  16. do while lines(filename) 
  17.   actline = actline + 1; 
  18.   aline = linein(filename)
  19.  
  20.   if (\ (aline = '')) then
  21.     do
  22.       parse value aline with file expire rest
  23.       call addtickerobject "kgs",,'commerceK'actline, expire
  24.       call addtickerobject "img", file, 'commerce'actline, expire
  25.  
  26.     end
  27. end
  28.  
  29. call settickerspeed 40, 2
  30.  
  31. /* atomatically adjust the size of the ticker to the size of
  32.    the largest commercial */
  33. call adjusttickersize
  34.  
  35. exit
  36.  
  37.